<?php

// +----------------------------------------------------------------------

// | ThinkPHP [ WE CAN DO IT JUST THINK ]

// +----------------------------------------------------------------------

// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.

// +----------------------------------------------------------------------

// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )

// +----------------------------------------------------------------------

// | Author: liu21st <liu21st@gmail.com>

// +----------------------------------------------------------------------

use think\facade\Route;



//收银

Route::group(function (){



    //不需要登录

    Route::group(function (){

        Route::rule('cashier/login','cashier.Main/login');

    });



    //登录后的操作

    Route::group(function (){

        //首页

        Route::group(function (){

            Route::rule('cashier/home','cashier.Main/home');

            Route::rule('cashier/getMemberId','cashier.Main/getMemberId');

        });



        //订单

        Route::group(function (){

            Route::rule('cashier/getOrderList','cashier.Order/getOrderList');

            Route::rule('cashier/getOrderDetail','cashier.Order/getOrderDetail');

            Route::rule('cashier/createOrder','cashier.Order/createOrder');

            Route::rule('cashier/moneyPay','cashier.Order/moneyPay');

            Route::rule('cashier/cashPay','cashier.Order/cashPay');

            Route::rule('cashier/scanPay','cashier.Order/scanPay');

            Route::rule('cashier/queryOrder','cashier.Order/queryOrder');

            Route::rule('cashier/cancelPay','cashier.Order/cancelPay');

            Route::rule('cashier/cancelOrder','cashier.Order/cancelOrder');

        });



        //收银

        Route::group(function (){

            Route::rule('cashier/getGoodsList','cashier.Cash/getGoodsList');

            Route::rule('cashier/getChooseMemberList','cashier.Cash/getChooseMemberList');

            Route::rule('cashier/getChooseCouponList','cashier.Cash/getChooseCouponList');

        });



        //会员

        Route::group(function (){

            Route::rule('cashier/showMember','cashier.Member/showMember');

            Route::rule('cashier/saveMember','cashier.Member/saveMember');

            Route::rule('cashier/getMemberDetail','cashier.Member/getMemberDetail');



            //余额和积分

            Route::rule('cashier/balanceRecharge','cashier.Member/balanceRecharge');

            Route::rule('cashier/balanceDeduction','cashier.Member/balanceDeduction');

            Route::rule('cashier/integralRecharge','cashier.Member/integralRecharge');

            Route::rule('cashier/integralDeduction','cashier.Member/integralDeduction');



            //次卡

            Route::rule('cashier/getMemberOnceCardList','cashier.Member/getMemberOnceCardList');

            Route::rule('cashier/chooseOnceCard','cashier.Member/chooseOnceCard');

            Route::rule('cashier/applyOnceCard','cashier.Member/applyOnceCard');

            Route::rule('cashier/writeOffOncecardOrder','cashier.Member/writeOffOncecardOrder');

            Route::rule('cashier/getMemberOnceCardLogs','cashier.Member/getMemberOnceCardLogs');



            //优惠卷

            Route::rule('cashier/getMemberCouponList','cashier.Member/getMemberCouponList');

            Route::rule('cashier/getMemberCouponLogsList','cashier.Member/getMemberCouponLogsList');

            Route::rule('cashier/chooseCoupon','cashier.Member/chooseCoupon');

            Route::rule('cashier/sendCoupon','cashier.Member/sendCoupon');

            Route::rule('cashier/writeOffCoupon','cashier.Member/writeOffCoupon');



            //商城订单

            Route::rule('cashier/getGoodsOrderList','cashier.Member/getGoodsOrderList');

            Route::rule('cashier/overGoodsOrder','cashier.Member/overGoodsOrder');

            Route::rule('cashier/deliverGoodsOrder','cashier.Member/deliverGoodsOrder');

            Route::rule('cashier/writeOffOrder','cashier.Member/writeOffOrder');



            //收银订单

            Route::rule('cashier/getMemberOrderList','cashier.Member/getMemberOrderList');



            //抢购

            Route::rule('cashier/getMemberSnapUpList','cashier.Member/getMemberSnapUpList');

            Route::rule('cashier/writeOffSnapupOrder','cashier.Member/writeOffSnapupOrder');

            Route::rule('cashier/getMemberSnapUpLogs','cashier.Member/getMemberSnapUpLogs');



            //日志

            Route::rule('cashier/getMemberBalanceLogsList','cashier.Member/getMemberBalanceLogsList');

            Route::rule('cashier/getMemberIntegralLogsList','cashier.Member/getMemberIntegralLogsList');

            Route::rule('cashier/getMemberBuyLogsList','cashier.Member/getMemberBuyLogsList');

        });





    })->middleware(\app\beautiful\middleware\CashierCheck::class);







    //会员管理

//    Route::group(function (){

//        Route::rule('cashier/getMemberList','cashier.Member/index');

//        Route::rule('cashier/showMember','cashier.Member/show');

//        Route::rule('cashier/saveMember','cashier.Member/save');

//        Route::rule('cashier/saveNickName','cashier.Member/saveNickName');

//        Route::rule('cashier/exportMember','cashier.Member/export');

//

//        Route::rule('cashier/getMemberDetail','cashier.Member/detail');

//        Route::rule('cashier/assignAdviser','cashier.Member/assignAdviser');

//        Route::rule('cashier/balanceRecharge','cashier.Member/balanceRecharge');

//        Route::rule('cashier/balanceDeduction','cashier.Member/balanceDeduction');

//        Route::rule('cashier/integralRecharge','cashier.Member/integralRecharge');

//        Route::rule('cashier/integralDeduction','cashier.Member/integralDeduction');

//        Route::rule('cashier/sendCoupon','cashier.Member/sendCoupon');

//

//        Route::rule('cashier/getMemberCouponList','cashier.member.Coupon/index');

//        Route::rule('cashier/getMemberCouponLogsList','cashier.logs.Member/coupon');

//        Route::rule('cashier/writeOffCoupon','cashier.Member/writeOffCoupon');

//

//        Route::rule('cashier/getMemberBalanceLogsList','cashier.logs.Member/balance');

//        Route::rule('cashier/getMemberIntegralLogsList','cashier.logs.Member/integral');

//        Route::rule('cashier/getMemberBuyLogsList','cashier.logs.Member/buy');

//

//        //线下补单

//        Route::rule('cashier/getSupplementList','cashier.member.Supplement/index');

//        Route::rule('cashier/getMemberWithMobileFromSupplement','cashier.member.Supplement/getMemberWithMobileFromSupplement');

//        Route::rule('cashier/saveSupplement','cashier.member.Supplement/save');

//        //办理次卡

//        Route::rule('cashier/chooseOnceCard','cashier.project.Oncecard/chooseOnceCard');

//        Route::rule('cashier/applyOnceCard','cashier.project.Oncecard/applyOnceCard');

//    });





})->middleware(\app\beautiful\middleware\Base::class);

